<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<body>
    <nav class="pagination" th:fragment="pageNav(pageInfo)">

        <th:block th:if="${pageInfo.hasPreviousPage}">
            <a class="extend prev" rel="prev" th:href="@{'?page='+${pageInfo.prePage}}">
                <i class="fa fa-angle-left"></i>
            </a>
        </th:block>

        <th:block th:each=" nav : ${pageInfo.navigatepageNums}">
            <span th:class="${nav==pageInfo.pageNum} ? 'current' : ''">
                <a class="page-number" th:href="@{'?page='+${nav} }" th:text="${nav}"></a>

            </span>
        </th:block>

        <th:block th:if="${pageInfo.hasNextPage}">
            <a class="extend next" rel="next" th:href="@{'?page='+${pageInfo.nextPage}}">
                <i class="fa fa-angle-right"></i>
            </a>
        </th:block>


    </nav>

</body>

</html>